package com.liziba.trend.feign;

import cn.hutool.core.collection.CollUtil;
import com.liziba.trend.api.IndexData;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @program: trend
 * @description: 服务降级处理
 * @author: liziba
 * @date: 2021-02-03 12:06
 */

@Component
public class IndexDataClientFeignHystrix implements IndexDataClient {

    /**
     * 服务降级处理
     * @param code
     * @return
     */
    @Override
    public List<IndexData> getIndexCode(String code) {
        IndexData indexData = new IndexData("0000-00-00", 0);
        return CollUtil.toList(indexData);
    }
}
